/**
 * OverView: 页面loading效果交互包
 * Author: Zhaomi
 * Date: 13-5-29 下午6:19
 * Email: yanyuetian@gmail.com
 * Create By JetBrains WebStorm.
 */
var errorTpl =  '<div class="bLoad_e"><span style="font-size: 17px;color: rgb(189, 180, 180);">抱歉, 内容加载出错！</span><span class="bLoad_txt">请点此重试</span></div>';
var loadTpl = '<div class="bLoad" id="loaddiv"><div class="loading-bg"><i></i></div></div>';
var loadDiv = $("#loaddiv");

exports.success = function(){
    loadDiv.hide();
};

exports.failed = function(e){
    loadDiv.html(errorTpl);
    loadDiv.on("tap", function(){
        window.location.reload(true);
    });
};

exports.reset = function(){
    loadDiv = $(loadTpl);
    $("body").html(loadDiv);//.append(loadDiv);
};
